<?php
    @header("Content-Type:text/html;charset=utf-8");  // 兼容低版本php
    
    @include_once("conn.php");

    if(!(isset($_GET["phone"])&&isset($_GET["pwd"]))){
      $obj = array();
      $obj["status"] = false;
      $obj["msg"] = "请传入完整参数";
      $json = json_encode($obj);
      exit($json);
  }

    // $user = $_GET["user"];
    $phone = $_GET["phone"];
    $pwd = $_GET["pwd"];
    // $email = $_GET["email"];

    $sql = "insert into `filainfo`(phone,pwd) values('$phone','$pwd')";

    $result = mysqli_query($conn,$sql);

    $obj = array();

    if($result){

      $rows = mysqli_affected_rows($conn);

      if($rows>0){
        $obj["status"] = true;
        $obj["msg"] = "新增成功";
      }
    }else{

      $obj["status"] = false;
      $obj["msg"] = "sql语句错误";
      $obj["sql"] = $sql;
    }

    echo json_encode($obj);


?>